/** 驼峰命名转中划线 */
export const camelToSnake = (str: string) =>
  str.replace(/[A-Z]/g, (match, offset) => {
    return (offset === 0 ? '' : '-') + match.toLowerCase();
  });
